<!DOCTYPE html>
<html lang="en">
<head>
<title>huangliusong</title>
<script src="./vue.js"></script>
</head>
 
<body>
	<div id="root">
		<child ></child>
	</div>

	<script type="text/javascript">
		Vue.component('child',{
			props:{
				content:{
					type:String
					/*required:false ,
					default:'默认值ddd',
					validator:function(value){
						return (value.length>5)
					}*/
				}
			},
			template:"<div>{{content}}</div>"
		})
		var vm=new Vue({
			el:"#root"
		})
	</script>
</body>

</html>